package ch03.test.test1.dao.Impl;

public class ShowImpl {
    public static YuSuanDao getInstance(String fu){
        switch (fu){
            case "+":
                return new YuSuanDaoImpl();
            case "-":
                return new JIanDaoImpl();
            case "*":
                return new ChenDaoImpl();
            case "/":
                return new ChuDaoImpl();
            default:
                throw new RuntimeException("您输入的运算符不正确！");
        }
    }
}
